<?php 
require_once ('inc/layout.inc');

HTMLHeader();
?>
		<div id="mainWrapper">
			<div id="main">
				<?php 
					$page = $_GET['p'];
					printHeader(); 
					printNavigation($page);
				?>
				<div id="mainContent">
					<?php 
						if(strlen($page) <= 11 && ($page == '' || $page == 'home' || $page == 'call' || $page == 'about' ||
						   $page == 'contact' || $page == 'affiliates' || $page == 'news')) {
							
						   	switch($page) {
						   		case '':
						   		case 'home':
						   			printHomePage();
						   			break;
						   		case 'news':
						   			printNewsPage();
						   			break;
						   		case 'call':
						   			printCallOnCure();
						   			break;
						   		case 'contact':
						   			printContactsPage();
						   			break;
						   		case 'affiliates':
						   			printAffiliatesPage();
						   			break;
						   		case 'about':
						   			printAboutPage();
						   			break;
						   	}
						   	
						}
						else {
							printErrorPage();
						}
					?>
				</div>
				<?php 
				printFooter();
				?>
			</div> <!-- main -->
		</div> <!-- mainWrapper -->
<?php 
HTMLFooter();
?>